<!--学习驿站列表子项组件-->
<template>
  <view class="entire">
    <image :src="cert.frontImg" class="picture" />
    <view class="info">
      <view class="top">
        <view class="left">{{ cert.achievementTitle }}</view>
        <view class="right">
          <image src="/static/images/icons/icon_certificate.png"></image>
        </view>
      </view>
      <divider />
      <view class="bottom">
        <image
          style="width: 25rpx; height: 25rpx; margin-left: 30rpx"
          src="/static/images/icons/icon_time.png"
        />
        <view style="margin-left: 10rpx; color: grey">获得证书时间</view>
        <view style="min-width: 50rpx; margin-left: 20rpx; color: #254d80">{{ cert.time }}</view>
      </view>
    </view>
  </view>
</template>

<script setup>
const props = defineProps({
  cert: {},
})
</script>

<style scoped lang="scss">
.entire {
  width: 700rpx;
  height: 160rpx;
  background-color: white;
  border-radius: 15rpx;
  margin-left: 25rpx;
  margin-top: 30rpx;
  display: flex;
  .picture {
    overflow: hidden;
    margin-top: 5rpx;
    margin-left: 5rpx;
    width: 100rpx;
    height: 150rpx;
    border-radius: 15rpx;
  }
  .info {
    display: flex;
    width: 600rpx;
    height: 160rpx;
    flex-direction: column;
    justify-content: space-between;
    .top {
      display: flex;
      height: 80rpx;
      justify-content: space-between;
      .left {
        margin-top: 10rpx;
        margin-left: 30rpx;
        font-size: 30rpx;
        font-weight: bolder;
        padding-left: 10rpx;
        width: 340rpx;
        //文字两行省略
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        white-space: normal;
      }
      .right {
        margin-top: 10rpx;
        margin-right: 10rpx;
        width: 43rpx;
        height: 60rpx;
      }
    }
    .bottom {
      display: flex;
      height: 70rpx;
      margin-left: 5rpx;
      align-items: center;
      font-size: 25rpx;
    }
  }
}
.entire {
  background-color: #ffffff;
}
.entire:active {
  background-color: #f5f5f7;
}
</style>
